How Vaccines Scheduling Works
Overview
When the application is first installed, all vaccine-related data is provided as part of the MetaData. This metadata includes all information necessary for vaccine scheduling, such as details about vaccines, vaccine gaps, and gap types. Using this information, the application dynamically generates a personalized vaccination schedule for each child at runtime.
Key Components
- Metadata
Metadata serves as the foundational dataset for vaccines. It includes details about the following:
- Vaccines: A list of all available vaccines, including their names, descriptions, and other relevant details.
- Vaccine Gap: Information about the time intervals between successive doses of the same vaccine or between different vaccines.
- Vaccine Gap Type: Definitions for the types of gaps, such as fixed intervals, age-based gaps, or event-based gaps.
- Vaccine PreRequisite: Define the relations between vaccines if any pre-requisite (vaccineId, vaccinePrerequisiteId)
- Tables
The metadata includes multiple related tables that collectively define the vaccination system:
- Vaccines Table: Contains information about individual vaccines, such as:
- Vaccine Id
- Vaccine Name
- Is Mandatory
- Vaccine Gap Table: Specifies the time intervals between doses or vaccine schedules.
- Vaccine Gap Type Table: Describes the types of gaps (e.g., Birthdate Gap,Previous Vaccine Gap,Vaccine Expiry Gap
Dynamic Scheduling Process
The application utilizes these tables to create a dynamic vaccination schedule at runtime for each child. The steps involved are as follows:
- Child Profile Input
- The user provides child-specific data, such as:
- Date of birth
- This information is used as a base for tailoring the vaccination schedule.
- Schedule Generation
- Using the Vaccines Table, the application identifies all required vaccines for the child.
- Based on the Vaccine Gap Table and Gap Type Table, the application calculates the appropriate intervals and assigns dates for each vaccine dose.
- nThe schedule is dynamic and accounts for adjustments due to:
- Eligible doses
- Due Doses/Scheduled Doses
The VaccineHelper class is responsible for dynamically generating and managing the child's vaccination schedule. It identifies all required vaccines using the Vaccines Table, calculates appropriate intervals based on the Vaccine Gap Table and Gap Type Table, and assigns due dates for each vaccine dose. The schedule is adaptive, adjusting based on eligible doses, due doses, and scheduled doses to ensure accurate and timely immunization tracking